package com.kitty.web.system.petset.service.impl;

import com.kitty.web.domain.PNewPetset;
import com.kitty.web.mapper.PNewPetsetMapper;
import com.kitty.web.system.petset.service.IPNewPetsetService;
import com.kitty.web.core.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 宠物配置Service业务层处理
 * 
 * @author soul
 * @date 2022-06-23
 */
@Service
public class PNewPetsetServiceImpl implements IPNewPetsetService
{
    @Autowired
    private PNewPetsetMapper pNewPetsetMapper;

    /**
     * 查询宠物配置
     * 
     * @param id 宠物配置ID
     * @return 宠物配置
     */
    @Override
    public PNewPetset selectPNewPetsetById(Long id)
    {
        return pNewPetsetMapper.selectPNewPetsetById(id);
    }

    /**
     * 查询宠物配置列表
     * 
     * @param pNewPetset 宠物配置
     * @return 宠物配置
     */
    @Override
    public List<PNewPetset> selectPNewPetsetList(PNewPetset pNewPetset)
    {
        return pNewPetsetMapper.selectPNewPetsetList(pNewPetset);
    }

    /**
     * 新增宠物配置
     * 
     * @param pNewPetset 宠物配置
     * @return 结果
     */
    @Override
    public int insertPNewPetset(PNewPetset pNewPetset)
    {
        return pNewPetsetMapper.insertPNewPetset(pNewPetset);
    }

    /**
     * 修改宠物配置
     * 
     * @param pNewPetset 宠物配置
     * @return 结果
     */
    @Override
    public int updatePNewPetset(PNewPetset pNewPetset)
    {
        return pNewPetsetMapper.updatePNewPetset(pNewPetset);
    }

    /**
     * 删除宠物配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deletePNewPetsetByIds(String ids)
    {
        return pNewPetsetMapper.deletePNewPetsetByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除宠物配置信息
     * 
     * @param id 宠物配置ID
     * @return 结果
     */
    @Override
    public int deletePNewPetsetById(Long id)
    {
        return pNewPetsetMapper.deletePNewPetsetById(id);
    }
}
